<?php
namespace app\admin\controller;

use app\common\model\ZhCate as ZhCateModel;

/**
 * 高僧大德分类控制器
 * Class Zhcate
 * @package app\index\controller
 */
class Zhcate extends Base
{
    /**
     * [index  列表]
     * @return json
     * @author [C。]
     */
    public function index()
    {
        $param = input('param.');
        $model = new ZhCateModel;
        try{
            $arr = array(
                [
                    'id' => 5,
                    'cname' => '现任住持'
                ],[
                    'id' => 6,
                    'cname' => '历代高僧'
                ]
            );
            $map['cid'] = 4;
            $map['comid'] = $param['comid'];
            $map['states'] = ['neq',3];
            $cate = $model->getAllData($map,'id','id,cname');
            $cate = array_merge($arr,$cate);
        }catch (\Exception $e) {
            return admin_json(-1, $e->getMessage());
        }
        return admin_json(1,'获取成功',$cate);
    }
}